1. Field
This application relates generally to data processing and more specifically, but not exclusively, to data synchronization.
2. Introduction
In a data communication system, data may be sent from one device to another device over a designated communication medium. Here, the device that sends the data (e.g., a source device) may generate the data based on a transmit clock. In some systems, the source device sends the data without sending the transmit clock signal. In such a case, the device that receives the data (e.g., a destination device) may use its own receive clock to process the received data. In cases where the receive clock and the transmit clock are not synchronized, however, there may be a timing mismatch between the rate at which the source device sends the data and the rate at which the destination device processes the received data.
A timing mismatch such as this may lead to errors in the received data. For example, the received data may be stored in a buffer at the destination device and read out of the buffer using the receive clock. If the receive clock lags (e.g., is slower than) the transmit clock, a buffer overflow condition may occur at the destination device. Conversely, if the receive clock leads (e.g., is faster than) the transmit clock, a buffer underflow condition may occur at the receiver. For certain types of data (e.g., streaming audio), data errors caused by such data over-runs or under-runs may cause distortion in an output signal (e.g., an audio signal) generated from the received data.
One technique for addressing a timing mismatch problem is making the transmit clock available to the destination device in some manner (e.g., directly or via the data stream). In this case, the destination device uses the transmit clock or a clock that is synchronized to the transmit clock to process received data. In practice, however, such a technique may be relatively complex to implement. Such a technique may be even more complex in cases where the destination device receives data from multiple sources (e.g., each of which has its own transmit clock). The complexity associated with this technique may thus make it undesirable for some applications due to, for example, a resulting increase in hardware cost and, in some cases, reduction in battery life.
Another technique for addressing such a timing mismatch involves modifying the receive buffer using dynamic time-warping. Time-warping involves modifying the size of the buffer by upsampling and downsampling the received samples to provide data at a desired data rate. However, time-warping involves spectral domain processing or autocorrelation methods in the time domain. As these processes are computationally expensive and result in additional data processing delays, time-warping may not be a practical solution for some applications.